package com.study.controller;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import com.study.utils.ApiVersion;

@RequestMapping("{version}/teacher")
@Controller
public class TeacherController {

	@ResponseBody
	@ApiVersion(1)
	@RequestMapping(value = "list", method = RequestMethod.GET)
	public void teachers(HttpServletRequest request, HttpServletResponse response) {
		System.out.println("version 1");
	}

	@ResponseBody
	@ApiVersion(2)
	@RequestMapping(value = "list", method = RequestMethod.GET)
	public void teachersV2(HttpServletRequest request, HttpServletResponse response) {
		System.out.println("version 2");
	}
	
	@ResponseBody
	@ApiVersion(5)
	@RequestMapping(value = "list", method = RequestMethod.GET)
	public void teachersV5(HttpServletRequest request, HttpServletResponse response) {
		System.out.println("version 5");
	}
}